home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Chat & Communication / Digsby build 37 / digsby_setup.exe / lib / yahoo / yahooP2Psocket.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2008-10-13  |  2KB  |  44 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.5)
  3.  
  4. from logging import getLogger
  5. from yahoo.YahooSocket import YahooSocket
  6. import common
  7. log = getLogger('YahooP2PSocket')
  8.  
  9. class YahooP2PSocket(YahooSocket):
  10.     
  11.     def __init__(self, yahoo, server, session_id):
  12.         YahooSocket.__init__(self, yahoo, server)
  13.         self.session_id = session_id
  14.  
  15.     
  16.     def handle_connect(self):
  17.         log.info('Yahoo Socket connected to %s:%d', *self.server)
  18.         self.yahoo.on_connect()
  19.  
  20.     
  21.     def handle_close(self):
  22.         log.critical('handle_close')
  23.         self.yahoo.on_close()
  24.         self.close()
  25.         self.yahoo = None
  26.  
  27.     
  28.     def handle_error(self, *a, **k):
  29.         import traceback as traceback
  30.         traceback.print_exc()
  31.         log.error('handle_error')
  32.         self.yahoo.on_close()
  33.         self.yahoo = None
  34.         common.socket.handle_error(self, *a, **k)
  35.  
  36.     
  37.     def handle_expt(self):
  38.         log.error('handle_expt: out-of-band data')
  39.         self.yahoo.on_close()
  40.         self.close()
  41.         self.yahoo = None
  42.  
  43.  
  44.